package com.duowei.diandan.db.dao;

import android.arch.lifecycle.LiveData;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.Query;

import com.duowei.diandan.db.entry.Mzszmxxx;

import java.util.List;

@Dao
public interface MzszmxxxDao {

    @Query("SELECT * FROM mzszmxxx")
    List<Mzszmxxx> findAll();

    @Query("SELECT * FROM mzszmxxx WHERE bm = :bm")
    List<Mzszmxxx> findByBm(String bm);

    @Query("SELECT * FROM mzszmxxx WHERE bm = :bm")
    LiveData<List<Mzszmxxx>> findByBm2(String bm);

    @Insert
    void insert(List<Mzszmxxx> list);

    @Query("DELETE FROM mzszmxxx")
    void deleteAll();
}
